<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>bookstroe后台管理系统</title>
		<link rel="stylesheet" href="../layui/css/layui.css">
		<link rel="stylesheet" type="text/css" href="../css/admin.css" />
	</head>

	<body class="layui-layout-body">
		<div class="layui-layout layui-layout-admin">
			<div class="layui-header">
				<div class="layui-logo">Bookstroe后台系统</div>
				<!-- 头部区域（可配合layui已有的水平导航） -->

				<ul class="layui-nav layui-layout-right">
					<li class="layui-nav-item">
						<a href="javascript:;">
							<img src="../layui/images/face/12.gif" class="layui-nav-img">
							<font id="admin">admin</font>
						</a>
					</li>
					<li class="layui-nav-item">
						<a id="exit" href="javascript:void(0)">退出</a>
					</li>
				</ul>
			</div>

			<div class="layui-side layui-bg-black">
				<div class="layui-side-scroll">
					<!-- 左侧导航区域（可配合layui已有的垂直导航） -->
					<ul class="layui-nav layui-nav-tree" lay-filter="test">
						<li class="layui-nav-item layui-nav-itemed">
							<a class="" href="javascript:;">商品管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="addbook" href="javascript:;">添加商品</a>
								</dd>
								<dd>
									<a class="delbook" href="javascript:;">删除商品</a>
								</dd>
								<dd>
									<a class="dirbook" href="javascript:;">查看商品</a>
								</dd>
							</dl>
						</li>
						<li class="layui-nav-item">
							<a href="javascript:;">用户管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="adduser" href="javascript:;">添加用户</a>
								</dd>
								<dd>
									<a class="deluser" href="javascript:;">删除用户</a>
								</dd>
								<dd>
									<a class="diruser" href="javascript:;">查看用户</a>
								</dd>
							</dl>
						</li>
						<li class="layui-nav-item">
							<a href="javascript:;">订单管理</a>
							<dl class="layui-nav-child">
								<dd>
									<a class="dirorder" href="javascript:;">查看订单</a>
								</dd>
								<dd>
									<a class="delorder" href="javascript:;">删除订单</a>
								</dd>
							</dl>
						</li>
					</ul>
				</div>
			</div>

			<div class="layui-body" id="index">
				<!-- 内容主体区域 -->
			</div>
 
			<div class="layui-footer">
				<!-- 底部固定区域 -->
				© bookstroe.admin.Admin
			</div>
		</div>
		<script src="../dist/jquery-2.0.0.min.js" type="text/javascript" charset="utf-8"></script>
		<script src="../layui/layui.js"></script>
		<script src="../js/admin.js" type="text/javascript" charset="utf-8"></script>
	</body>
 <script type="text/javascript">
 	$("#exit").click(function(){
	$.ajax({
		type:"post",
		url:"/Second_Project/exit",
		async:true,
		success:function exit(){
			self.location.href="/Second_Project/login/adminlogin.html"
		},
		error:function	error(){
		layer.msg("系统错误");	
		}
	});
})
 	$.ajax({
			type:"get",
			url:"/Second_Project/checklogin",
			async:true,
			success:function success(code){
				if(code != ""){ 
					layer.msg("Welcome!");
				}
				else{
					top.location.href="../../login/adminlogin.html"
				}
			}
		});
 </script>
</html>